<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8" />
    <title>管理员控制台</title>
    <link rel="stylesheet" th:href="@{/css/style.css}" />
</head>
<body>
<div class="container">
    <h1>管理员控制台</h1>
    <div class="nav">
        <a class="btn" href="/admin/consultations">咨询记录</a>
        <a class="btn" href="/admin/users">用户管理</a>
    </div>
    <hr/>
    <p>用户总数：<strong th:text="${userCount}"></strong></p>
    <p>咨询总数：<strong th:text="${consultCount}"></strong></p>
    <div class="grid">
        <div>
            <h3>热门车型TOP5</h3>
            <ul>
                <li th:each="e : ${topBodyTypes}">
                    <span th:text="${e.key}"></span>：<span th:text="${e.value}"></span>
                </li>
            </ul>
        </div>
        <div>
            <h3>热门场景TOP5</h3>
            <ul>
                <li th:each="e : ${topScenes}">
                    <span th:text="${e.key}"></span>：<span th:text="${e.value}"></span>
                </li>
            </ul>
        </div>
        <div>
            <h3>热门燃料类型TOP5</h3>
            <ul>
                <li th:each="e : ${topFuel}">
                    <span th:text="${e.key}"></span>：<span th:text="${e.value}"></span>
                </li>
            </ul>
        </div>
    </div>
    <a href="/dashboard" class="btn">返回</a>
    </div>
</body>
</html>